home *** CD-ROM | disk | FTP | other *** search
-
-
-
- KKKKIIIILLLLLLLL((((3333BBBB)))) KKKKIIIILLLLLLLL((((3333BBBB))))
-
-
-
- NNNNAAAAMMMMEEEE
- kill - send signal to a process (4.3BSD)
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssiiiiggggnnnnaaaallll....hhhh>>>>
-
- iiiinnnntttt kkkkiiiillllllll((((ppppiiiidddd____tttt ppppiiiidddd,,,, iiiinnnntttt ssssiiiigggg))));;;;
-
- To use any of the BSD signal routines (_k_i_l_l(3B), _k_i_l_l_p_g(3B),
- _s_i_g_b_l_o_c_k(3B), _s_i_g_n_a_l(3B), _s_i_g_p_a_u_s_e(3B), _s_i_g_s_e_t_m_a_s_k(3B), _s_i_g_s_t_a_c_k(2B),
- _s_i_g_v_e_c(3B)) you must either
-
- 1) #define ____BBBBSSSSDDDD____SSSSIIIIGGGGNNNNAAAALLLLSSSS or ____BBBBSSSSDDDD____CCCCOOOOMMMMPPPPAAAATTTT before including <_s_i_g_n_a_l._h>, or
-
- 2) specify one of them in the compile command or makefile:
-
- cc -D_BSD_SIGNALS -o prog prog.c
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _k_i_l_l sends the signal _s_i_g to a process, specified by the process number
- _p_i_d. _S_i_g may be one of the signals specified in _s_i_g_v_e_c(3B), or it may be
- 0, in which case error checking is performed but no signal is actually
- sent. This can be used to check the validity of _p_i_d.
-
- The sending and receiving processes must have the same effective user ID,
- otherwise this call is restricted to the super-user. A single exception
- is the signal SSSSIIIIGGGGCCCCOOOONNNNTTTT, which may always be sent to any descendant of the
- current process.
-
- If the process number is 0, the signal is sent to all processes in the
- sender's process group; this is a variant of _k_i_l_l_p_g(3B).
-
- If the process number is -1 and the user is the super-user, the signal is
- broadcast universally except to system processes. If the process number
- is -1 and the user is not the super-user, the signal is broadcast
- universally to all processes with the same uid as the user. No error is
- returned if any process could be signaled.
-
- For compatibility with System V, if the process number is negative but
- not -1, the signal is sent to all processes whose process group ID is
- equal to the absolute value of the process number. This is a variant of
- _k_i_l_l_p_g(3B).
-
- Processes may send signals to themselves.
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- Upon successful completion, a value of 0 is returned. Otherwise, a value
- of -1 is returned and _e_r_r_n_o is set to indicate the error.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- KKKKIIIILLLLLLLL((((3333BBBB)))) KKKKIIIILLLLLLLL((((3333BBBB))))
-
-
-
- EEEERRRRRRRROOOORRRRSSSS
- _k_i_l_l will fail and no signal will be sent if any of the following occur:
-
- [EINVAL] _S_i_g is not a valid signal number.
-
- [ESRCH] No process can be found corresponding to that specified by
- _p_i_d.
-
- [ESRCH] The process id was given as 0 but the sending process does
- not have a process group.
-
- [EPERM] The sending process is not the super-user and its
- effective user ID does not match the effective user ID of
- the receiving process.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- getpid(2), getpgrp(2), killpg(3B), sigvec(3B)
-
- CCCCAAAAVVVVEEEEAAAATTTTSSSS ((((IIIIRRRRIIIIXXXX))))
- When the process number is -1, the process sending the signal is NOT
- included in the delivery group. In the IRIX implementation, the sending
- process receives the signal, too.
-
- 4.3BSD's implementation of kill returns EEEEPPPPEEEERRRRMMMM if any members of a process
- group can not be signaled (when _k_i_l_l is invoked with a _p_i_d of 0). The
- IRIX implementation does not.
-
- WWWWAAAARRRRNNNNIIIINNNNGGGG ((((IIIIRRRRIIIIXXXX))))
- The 4.3BSD and System V signal facilities have different semantics.
- Using both facilities in the same program is ssssttttrrrroooonnnnggggllllyyyy ddddiiiissssccccoooouuuurrrraaaaggggeeeedddd and
- will result in unpredictable behavior.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-